<?php
/**
 * The template for displaying Search Results pages.
 *
 * @package WordPress
 * @subpackage inspius
 * @since inspius 1.0
 */
get_header();?>
<!-- Head Libs -->
<script src="<?php bloginfo('stylesheet_directory'); ?>/vendor/modernizr.js"></script>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/theme-blog.css">
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/bootstrap.css">
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/blue.css">
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/fonts/font-awesome/css/font-awesome.css">
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/vendor/flexslider/flexslider.css" media="screen" />
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/vendor/fancybox/jquery.fancybox.css" media="screen" />
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/vendor/isotope/jquery.isotope.css" media="screen" />
<section class="page-top">
    <div class="container">
        <div class="row">
            <div class="span12">
                <ul class="breadcrumb">
                    <?php bcn_display(); ?> 
                </ul>
            </div>
        </div>
        <div class="row">
            <div class="span12">
                <h2><?php the_category(' '); ?></h2>
            </div>
        </div>
    </div>
</section>
<?php
$cat_object = $wp_query->get_queried_object();
$parentcat = ($cat_object->category_parent) ? $cat_object->category_parent : $cat;
//echo "<script>alert('".$cat_object->name."')</script>";
?>
    <?php
    $args = array(
        'show_option_all' => '',
        'orderby' => 'name',
        'order' => 'ASC',
        'style' => 'list',
        'show_count' => 0,
        'hide_empty' => 1,
        'use_desc_for_title' => 1,
        'child_of' => $cat,
        'feed' => '',
        'feed_type' => '',
        'feed_image' => '',
        'exclude' => '',
        'exclude_tree' => '',
        'include' => '',
        'hierarchical' => 1,
        'title_li' => __(''),
        'show_option_none' => __('No categories'),
        'number' => null,
        'echo' => 1,
        'depth' => 0,
        'current_category' => 0,
        'pad_counts' => 0,
        'taxonomy' => 'category',
        'walker' => null
    );
    ?>
    <div class="container">

        <div class="row">
            <div class="span9">
                <div class="blog-posts">
                    <?php while (have_posts()) : the_post(); ?>
                    <article class="post post-medium-image">
                        <div class="row">

                            <div class="span4">
                                <div class="post-image">
                                    <div data-plugin-options="{&quot;controlNav&quot;:false, &quot;animation&quot;:&quot;slide&quot;, &quot;slideshow&quot;: false, &quot;maxVisibleItems&quot;: 1}" class="flexslider flexslider-center-mobile flexslider-simple normal-device flexslider-init flexslider-direction-nav">

                                        <div class="flex-viewport" style="overflow: hidden; position: relative;"><ul class="slides" style="width: 600%; transition-duration: 0s; transform: translate3d(0px, 0px, 0px);">
                                                <li style="width: 362.5px; float: left; display: block;" class="flex-active-slide">
                                                    <?php the_post_thumbnail('full'); ?>
                                                </li>
                                                <li style="width: 362.5px; float: left; display: block;">
                                                    <?php kd_mfi_the_featured_image( 'featured-image-2', 'post' );?>
                                                </li>
                                                <li style="width: 362.5px; float: left; display: block;">
                                                    <?php kd_mfi_the_featured_image( 'featured-image-3', 'post' );?>
                                                </li>
                                            </ul></div><ul class="flex-direction-nav"><li><a href="#" class="flex-prev flex-disabled">Previous</a></li><li><a href="#" class="flex-next">Next</a></li></ul></div>
                                </div>
                            </div>
                            <div class="span5">

                                <div class="post-content">

                                    <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
                                    <p><?php the_excerpt(); ?></p>

                                </div>
                            </div>

                        </div>
                        <div class="row">
                            <div class="span9">
                                <div class="post-meta">
                                    <span><i class="icon-calendar"></i> <?php the_date(); ?> </span>
                                    <span><i class="icon-user"></i> By <a href="#"><?php the_author(); ?></a> </span>
                                    <span><i class="icon-comments"></i> <a href="#"><?php comments_number( 'no responses', 'one response', '% responses' ); ?></a></span>
                                    <a class="btn btn-mini btn-primary pull-right" href="<?php the_permalink(); ?>">Read more...</a>
                                </div>
                            </div>
                        </div>

                    </article>
                    <?php endwhile; ?>
                    

                    <div class="pagination pagination-large pull-right">
                        <ul>
                            <li><a href="#">«</a></li>
                            <li class="active"><a href="#">1</a></li>
                            <li><a href="#">2</a></li>
                            <li><a href="#">3</a></li>
                            <li><a href="#">»</a></li>
                        </ul>
                    </div>

                </div>
            </div>

            <div class="span3">

                <aside class="sidebar">

                    <form class="form-search" id="searchForm" action="<?php echo esc_url(home_url('/')); ?>" method="get">
                        <div class="input-append">
                            <input type="text" class="span2 search-query" name="q" id="q" placeholder="Search for <?php echo ($cat_object->name); ?>...">
                            <button class="btn btn-primary" type="submit"><i class="icon-search"></i></button>
                        </div>
                    </form>

                    
                    <!--								
                                                                                    
                                                                                            <li><a href="#">Design</a></li>
                                                                                            <li><a href="#">Photos</a></li>
                                                                                            <li><a href="#">Videos</a></li>
                                                                                            <li><a href="#">Lifestyle</a></li>
                                                                                            <li><a href="#">Technology</a></li>
                                                                                    </ul>-->

                    

                    <hr>
    <?php get_sidebar("blog"); ?>

                </aside>
            </div>
        </div>

    </div>

<?php get_footer(); ?>
<!-- Libs -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="<?php bloginfo('stylesheet_directory'); ?>/vendor/jquery.js"><\/script>')</script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/vendor/jquery.easing.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/vendor/jquery.cookie.js"></script>
<!-- <script src="master/style-switcher/style.switcher.js"></script> -->
<script src="<?php bloginfo('stylesheet_directory'); ?>/vendor/bootstrap.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/vendor/selectnav.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/vendor/twitterjs/twitter.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/vendor/flexslider/jquery.flexslider.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/vendor/jflickrfeed/jflickrfeed.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/vendor/fancybox/jquery.fancybox.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/vendor/jquery.validate.js"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/vendor/isotope/jquery.isotope.js"></script>

<script src="<?php bloginfo('stylesheet_directory'); ?>/js/plugins.js"></script>

<!-- Page Scripts -->

<!-- Theme Initializer -->
<script src="<?php bloginfo('stylesheet_directory'); ?>/js/theme.js"></script>

<!-- Custom JS -->
<script src="<?php bloginfo('stylesheet_directory'); ?>/js/custom.js"></script>